import { Controller } from 'egg';

export default class ChatController extends Controller {
    public async index() {
        const { ctx } = this;
        console.log('ping');
        const message = ctx.args[0];
        await ctx.socket.emit('res', `Hi! I've got your message: ${ message }`);
    }
}
